package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.wx.brand.BrandDataVo;
import com.cskaoyan.bean.wx.brand.BrandDetailVo;
import com.cskaoyan.service.wx.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name : WxBrandController.java
 * @Time : 2021/8/14 23:20
 * @Author : creamycandy
 * @Software : IntelliJ IDEA
 */

@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    WxBrandService wxBrandService;

    @RequestMapping("detail")
    public BaseRespVo getBrandDetail(Integer id){
        BrandDetailVo brandDetail = wxBrandService.getBrandDetail(id);
        return BaseRespVo.ok(brandDetail);
    }

    @RequestMapping("list")
    public BaseRespVo getBrandList(Integer page, Integer size){
        BrandDataVo brandList = wxBrandService.getBrandList(page, size);
        return BaseRespVo.ok(brandList);
    }
}
